package safe.yunchexing.com.cloudsafe.mvp;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

/**
 * @author lixiaoming
 * @describe Activity基类，所有的Activity必须继承这个类.
 */
public class BaseActivity extends FragmentActivity implements IUI {

    protected boolean mIsActivityDestoryed = false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mIsActivityDestoryed = false;
    }


    @Override
    protected void onDestroy() {
        mIsActivityDestoryed = true;
        super.onDestroy();
    }

    public boolean isActivityDestoryed() {
        return mIsActivityDestoryed;
    }


    @Override
    public boolean isDestoryed() {
        return isActivityDestoryed();
    }

    @Override
    public boolean isDetached() {
        return isDestoryed();
    }


}
